//
// Created by wze-zero on 2024/10/25.
//
#include <iostream>

using namespace std;

long check(int n, int m) {
    if (m == 1) {
        return n;
    } else {
        return (n - m + 1) * check(n, m - 1);
    }
}

int main() {
    int n, m;
    cin >> n >> m;
    cout << check(n, m) << endl;
    return 0;
}